package com.day07.entity;

public class TestCountScore1 {
    public static void main(String[] args) {
        CountScore1 cs1 = new CountScore1();
        Score score = new Score();
        score.lang = 100;
        score.math = 70;
        score.english = 80;
        int sum = cs1.countSum(score);
        int avg = cs1.countAvg(score);
        System.out.println("sum="+sum);
        System.out.println("avg="+avg);
        System.out.println(cs1);
        cs1.score = new Score();
        System.out.println(cs1.score);
        cs1.score.math = 10;// null异常是因为为null的对象调用了属性或者方法。
        System.out.println(cs1.score.math);


    }
}
